An imaging device to be mounted on a front end portion of an insertion portion of an endoscope is generally provided with an image sensor and a circuit board on which the image sensor is mounted. A plurality of electric wires inserted into the insertion portion are connected to the circuit board. A flexible circuit board that can be folded to be comparatively small is typically used as the circuit board. However, a rigid circuit board may be used in some case (for example, see JP-A-2013-123628, JP-A-2014-204275 and JP-A-2015-62555).